<template>
	<view v-show="!isSortType">
		<view class="explosion" :style="'margin-top:' + mbConfig*2 +'rpx;background-color:' + boxColor+';'"
			v-if="explosiveMoney.length">
			<view class="hd skeleton-rect">
				<!-- <image src="/static/images/explosion-title.png" mode=""></image> -->
				<view class="title" :style="'color:'+themeColor+';'">{{$t(titleConfig)}}</view>
				<view class="txt"
					:style="'background: linear-gradient(90deg, '+ bgColor[0].item +' 0%, '+ bgColor[1].item +' 100%);'">
					{{$t(desConfig)}}
				</view>
			</view>
			<view class="bd">
				<view class="item skeleton-rect" @click="goDetail(item)" v-for="(item,index) in explosiveMoney"
					:key="index">
					<view class="cover">
						<image :src="item.img" mode="aspectFill"></image>
					</view>
					<view class="name" style="font-weight: bold;margin-top: 15rpx;width: 100%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
						{{$t(item.info[1].value)}}
					</view>
				</view>
				<navigator url="/pages/columnGoods/HotNewGoods/index?type=2&name=热销商品" class="all" style="display: flex;justify-content: center;align-items: center;" hover-class="none">
					<image src="/static/svg/quanbu.svg" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"></image>
					<view class="label" style="color: #ff2f00;">
						查看全部商品
					</view>
				</navigator>
				<!-- <view class="all" style="display: flex;justify-content: center;align-items: center;">
					<image src="/static/svg/quanbu.svg" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"></image>
					<view class="label" style="color: #ff2f00;">
						查看全部商品
					</view>
				</view> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'activeParty',
		props: {
			dataConfig: {
				type: Object,
				default: () => {}
			},
			isSortType: {
				type: String | Number,
				default: 0
			}
		},
		data() {
			return {
				titleConfig: this.dataConfig.titleConfig.value,
				desConfig: this.dataConfig.desConfig.value,
				explosiveMoney: this.dataConfig.menuConfig.list,
				themeColor: this.dataConfig.themeColor.color[0].item,
				bgColor: this.dataConfig.bgColor.color,
				mbConfig: this.dataConfig.mbConfig.val,
				boxColor: this.dataConfig.boxColor.color[0].item
			};
		},
		created() {},
		methods: {
			goDetail(item) {
				let urls = item.info[2].value
				this.$util.JumpPath(urls);
			}
		}
	}
</script>

<style lang="scss">
	.explosion {
		width: 710rpx;
		margin-top: 20rpx;
		margin: 20rpx auto 0 auto;
		padding: 30rpx 20rpx;
		padding: 40rpx 30rpx 20rpx 30rpx;
		// background-color: #FFE5E3;
		background-size: 100% 100%;
		border-radius: 16px 16px 0px 0px;
		box-sizing: border-box;
		position: relative;
		overflow: hidden;
		// opacity: 0.16;
		
		&::before{
			content: '';
			position: absolute;
			width: 100%;
			height: 100%;
			background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(-0.0030000000000001657%2C%200.973%2C%20-1.42264777696793%2C%20-0.0030000000000001657%2C%200.503%2C%200.024)%22%3E%3Cstop%20stop-color%3D%22%23f79a9a%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23fffdc9%22%20stop-opacity%3D%221%22%20offset%3D%220.39%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E");
			background-size: cover;
			z-index: 1;
			opacity: 0.16;
			left: 0;
			top: 0;
		}
		  
		.hd {
			// display: flex;
			// align-items: center;
			position: relative;
			z-index: 10;

			.title {
				font-size: 32rpx;
				font-weight: bold;
				margin-right: 12rpx;
			}

			image {
				width: 147rpx;
				height: 35rpx;
				margin-right: 20rpx;
			}

			.txt {
				// padding: 0 10rpx;
				// height: 36rpx;
				// line-height: 36rpx;
				// // background: linear-gradient(90deg, rgba(255, 168, 0, 1) 0%, rgba(255, 34, 15, 1) 100%);
				// border-radius: 26rpx 0px 26rpx 0px;
				// color: #fff;
				// text-align: center;
				// font-size: 22rpx;
				// // box-shadow: 3px 1px 1px 1px var(--view-minorColorT);
				color: rgba(65, 65, 65, 1);
				font-size: 12px;
				font-weight: 400;
				line-height: 17px;
				letter-spacing: 1.0px;
				margin-top: 10rpx;
			}
		}

		.bd {
			display: flex;
			flex-wrap: wrap;
			margin-top: 28rpx;
			position: relative;
			z-index: 10;
			justify-content: space-between;

			.item {
				// display: flex;
				// align-items: center;
				// justify-content: space-between;
				position: relative;
				width: 314rpx;
				height: 272rpx;
				margin-bottom: 20rpx;
				margin-right: 20rpx;
				background-color: #fff;
				border-radius: 16rpx;
				padding: 20rpx;
				box-sizing: border-box;

				image {
					width: 140rpx;
					height: 140rpx;
				}
				
				.cover{
					height: 192rpx;
					image{
						width: 100%;
						height: 100%;
					}
				}

				.con-box {
					display: flex;
					flex-direction: column;
					justify-content: center;
					width: 130rpx;
					height: 100%;

					.title {
						color: #282828;
						font-size: 28rpx;
					}

					.con {
						color: #999999;
						font-size: 20rpx;
						margin-top: 2rpx;
					}

					.go {
						display: flex;
						align-items: center;
						justify-content: center;
						margin-top: 10rpx;
						width: 112rpx;
						height: 36rpx;
						border-radius: 18rpx;
						color: #fff;
						font-size: 26rpx;
						font-weight: bold;
						font-style: italic;

						image {
							width: 26rpx;
							height: 26rpx;
						}
					}
				}

				&:first-child .go {
					background: linear-gradient(90deg, rgba(75, 196, 255, 1) 0%, rgba(32, 126, 255, 1) 100%);
				}

				&:nth-child(2) .go {
					background: linear-gradient(90deg, rgba(255, 144, 67, 1) 0%, rgba(255, 83, 29, 1) 100%);
				}

				&:nth-child(3) .go {
					background: linear-gradient(90deg, rgba(150, 225, 135, 1) 0%, rgba(72, 206, 44, 1) 100%);
				}

				&:nth-child(4) .go {
					background: linear-gradient(90deg, rgba(255, 197, 96, 1) 0%, rgba(255, 156, 0, 1) 100%);
				}

				&:nth-child(2n) {
					margin-right: 0;
				}
			}
		}
		
		.all{
			width: 100%;
		}
	}
</style>
